package com.huaao.micropolice.core.model.system;

import java.io.Serializable;
import java.util.LinkedHashSet;
import java.util.Set;



/**
 * @author qiyang
 * 岗位(人员类型)
 * @version 1.0
 */
public class Jobs implements Serializable{
	
	private String id;
	private String name;
	private String code;
	private String mark;
	private Dept dept;
	private Set<Role> roles = new LinkedHashSet<Role>();
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Dept getDept() {
		return dept;
	}

	public void setDept(Dept dept) {
		this.dept = dept;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMark() {
		return mark;
	}

	public void setMark(String mark) {
		this.mark = mark;
	}

	public Set<Role> getRoles() {
		return roles;
	}

	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}
	
	public String getDeptId(){
		if(this.dept != null){
			return dept.getId();
		}
		return null;
	}
	
	public void setDeptId(String deptId){
		Dept obj = new Dept();
		obj.setId(deptId);
		this.setDept(obj);
	}
}
